<?php

namespace app\admin\model;

use app\common\model\TimeModel;

class GroupMaster extends TimeModel
{

    protected $name = "group_master";

    protected $deleteTime = "delete_time";

    public function user()
    {
        return $this->belongsTo('User','user_id');
    }

    public function getRegisterTimeAttr($value)
    {
        return date('Y-m-d H:i:s',$value);
    }

    public function getAuditTimeAttr($value)
    {
        return date('Y-m-d H:i:s',$value);
    }


    public function getIsDeliveryList(): array
    {
        return ['0'=>'是','1'=>'否',];
    }

    public function getAuditStatusList(): array
    {
        return ['0'=>'待审核','1'=>'审核通过','2'=>'审核未通过',];
    }

    public function getMasterStatusList(): array
    {
        return ['0'=>'未启用','1'=>'启用','2'=>'禁用',];
    }

}